﻿@{
    Layout = null;
}
@model XT.Exam.MODEL.PagedList<XT.Exam.MODEL.BankList>
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link href="~/Content/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" />
    <link href="~/Content/static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" />
    <script src="~/JS/Login.js"></script>
    <link href="~/Content/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
    <title>题库列表</title>
    <style>
        #College {
            width: 100px;
        }

        #Tie {
            width: 100px;
        }

        #phasetable {
            width: 100px;
        }

        #Unit {
            width: 100px;
        }

        #searc {
            vertical-align: middle;
        }

        label {
            margin-top: 10px;
        }

        #btn {
            height: 30px;
        }
    </style>
</head>
<body>
    <div>
        <div style="margin-top:10px;">
            <div style="width:300px;float:left;">
                <a href="/SysuserInfo/ToLeadQuestion" style="margin-left:20px;" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>导入试题</a>
            </div>
            <form action="/SysUserInfo/QuestionBankList" method="get">
                <div id="searc" style="float:right;margin-right:30px;margin-bottom:20px;">
                    <label>学院：</label>
                    <select class="select" id="College" name="CollegeID" onchange="changeTie() "></select>
                    <label>系：</label>
                    <select class="select" id="Tie" name="TieID" onchange="changephasetable() "></select>
                    <label>阶段：</label>
                    <select class="select" id="phasetable" name="PhaseID"></select>
                    <label>单元：</label>
                    @Html.DropDownList("ID")
                    <input type="submit" value="Search" class="btn btn-danger radius size-S" />
                </div>
            </form>
        </div>
        <div>
            <table class="table table-condensed table-hover table-bg table-bordered table-border">
                <thead>
                    <tr><th colspan="7" scope="col">题干列表</th></tr>
                    <tr class="text-c">
                        <th>学院</th>
                        <th>系</th>
                        <th>阶段</th>
                        <th>题干</th>
                        <th>类型</th>
                        <th>单元</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.list != null)
                    {
                        foreach (var item in Model.list)
                        {
                            <tr class="text-c">
                                <td>@item.College_Name</td>
                                <td>@item.Tie_Name</td>
                                <td>@item.Phase_Name</td>
                                <td class="text-l">@item.Questionbank_Name</td>
                                <td>@item.ExamType_Name</td>
                                <td>@item.Unit_Name</td>
                                <td>
                                    <input id="btn" class="btn btn-success radius size-S" type="button" value="预览" />
                                    <a title="删除" href="#" class="ml-5" style="text-decoration: none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                                </td>
                            </tr>
                        }
                    }
                    else
                    { 
                        <tr>
                            <td>没有所查询数据</td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
    <div class="datatables_paginate paging_simple_numbers text-r" style="margin-right:30px;">
        @if (Model.list != null)
        {
            if (Convert.ToInt32(Session["TotalPageCount"]) > 1)
            {
                <a href="/SysUserInfo/QuestionBankList?PageIndex=1" class="btn  btn-default size-MINI">首页</a>
                if (Model.CurrentPageIndex == 1)
                {
                    <a class="btn  btn-default size-MINI">上一页</a>
                }
                else
                {
                    <a href="/SysUserInfo/QuestionBankList?PageIndex=@(Convert.ToInt32(Session["CurrentPageIndex"] )- 1)" class="btn  btn-default size-MINI">上一页</a>
                }

                for (int i = 0; i < Convert.ToInt32(Session["TotalPageCount"]); i++)
                {
                    if ((i + 1) == Convert.ToInt32(Session["CurrentPageIndex"]))
                    {
                        <a href="/SysUserInfo/QuestionBankList?PageIndex=@(i + 1)" style="font-size:20px;color:red" class="btn  btn-default size-MINI">@(i + 1)</a>
                        @: &nbsp;
    }
                    else
                    {
                        <a href="/SysUserInfo/QuestionBankList?PageIndex=@(i + 1)" class="btn  btn-default size-MINI">@(i + 1)</a>
                        @:   &nbsp;
    }
                }

                if (Model.CurrentPageIndex >= Model.TotalPageCount)
                {
                    <a class="btn  btn-default size-MINI">下一页</a>
                }
                else
                {
                    <a href="/SysUserInfo/QuestionBankList?PageIndex=@(Convert.ToInt32(Session["CurrentPageIndex"]) + 1)" class="btn  btn-default size-MINI">下一页</a>
                }
                <a href="/SysUserInfo/QuestionBankList?PageIndex=@Convert.ToInt32(Session["TotalPageCount"])" class="btn  btn-default size-MINI">尾页</a>
            }
        }
    </div>
    <script type="text/javascript" src="~/Content/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/lib/layer/2.4/layer.js"></script>
    <script src="~/Content/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/Content/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="~/Content/lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
    <script src="~/JS/TestPaperJS.js"></script>
    <script>
        //下拉框加样式
        $(function () {
            $("#ID").addClass("select");
            $("#ID").css("width", "100px");
        })
    </script>
</body>
</html>
